<?php
/**
 * @description : init the OAUTH requires and generate some default objects.
 * @author : stephen
 * @date : 2010/07/07
 */
require_once "TVB/OAuth/OAuth.class.php";
require_once "TVB/OAuth/OAuthConfig.class.php";
require_once "TVB/Config/requires.php";
require_once "TVB/DB/requires.php";
require_once "TVB/MSApi/Client/requires.php";
require_once "TVB/mytvplus/portal_service/client/requires.php";
require_once "TVB/OAuth/TVBCrypt.class.php";
require_once "TVB/OAuth/OAuthPageInfo.class.php";
require_once "TVB/OAuth/OAuthModelConfig.class.php";
require_once "TVB/OAuth/OAuthModel.class.php";
require_once "TVB/OAuth/OAuth_TVBServer.class.php";
require_once "TVB/OAuth/OAuthUtils.class.php";


//some objects init().
$tvb_server = new TVBOAuthServer(new TVBOAuthDataStore());

//signature method for HMAC_SHA1
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();

//signature mehtod for PLAINTEXT
$plaintext_method = new OAuthSignatureMethod_PLAINTEXT();

//signature method for RSA_SHA1
$rsa_method = new TestOAuthSignatureMethod_RSA_SHA1();

//add these signature method to server objects.
$tvb_server->add_signature_method($hmac_method);
$tvb_server->add_signature_method($plaintext_method);
$tvb_server->add_signature_method($rsa_method);

$sign_methods = $tvb_server->get_signature_methods();

?>
